-- GENERATED SPELL FOR [Bladespire Shaman] --


function spell0_19998(pUnit, Event) --@Bloodmaul Intoxication,n/a--
pUnit:FullCastSpellOnTarget(35240,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19998', 25000, 1)
end

function spell1_19998(pUnit, Event) --@Fire Nova Totem,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(32062,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_19998', 1, 1)
end

function spell2_19998(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(26098,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19998', 3000, 1)
end

function spell3_19998(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19998', 0, 1)
end

function Sorts_19998(pUnit, Event)
local choix_sorts_19998 = math.random(0, 3)
if choix_sorts_19998 == 0 then
pUnit:RegisterEvent('spell0_19998', 1, 1)
end
if choix_sorts_19998 == 1 then
pUnit:RegisterEvent('spell1_19998', 1, 1)
end
if choix_sorts_19998 == 2 then
pUnit:RegisterEvent('spell2_19998', 1, 1)
end
if choix_sorts_19998 == 3 then
pUnit:RegisterEvent('spell3_19998', 1, 1)
end
end

function mob19998_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19998', math.random(1500, 3000), 1)
end

function mob19998_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19998_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19998_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19998, 1, 'mob19998_Action')
RegisterUnitEvent(19998, 2, 'mob19998_Leave')
RegisterUnitEvent(19998, 3, 'mob19998_Kill')
RegisterUnitEvent(19998, 4, 'mob19998_Die')
